Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(apiWatch): constraint deep passes boolean #9952

Merged
merged 6 commits into from
Jan 3, 2024

Conversation

Alfred-Skyblue
Copy link
Member

@Alfred-Skyblue Alfred-Skyblue commented Dec 31, 2023

relate #9572

In #9572, modify deep to accept number type, allowing control of the depth of the watching object. To prevent users from inadvertently passing other types in previous versions, In the current version, add a warning message.

Copy link

github-actions bot commented Dec 31, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.4 kB 34 kB 30.6 kB
vue.global.prod.js 146 kB 53.3 kB 47.6 kB

Usages

Name Size Gzip Brotli
createApp 49.8 kB 19.5 kB 17.8 kB
createSSRApp 53.1 kB 20.8 kB 19 kB
defineCustomElement 52 kB 20.2 kB 18.5 kB
overall 63.2 kB 24.4 kB 22.2 kB

@@ -190,6 +190,15 @@ function doWatch(
}
}

// TODO remove in 3.5
if (__DEV__ && deep !== void 0 && typeof deep !== 'boolean') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be more explicit: only check for number values, and mention in the warning that numbers will be used to indicate watch depth in a future version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit a801c36
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/65953347e8b55200089451ff

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit a801c36
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/659533478c43840008ba109a

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit 6cc9151
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/65953358ca912a00086f0d20

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit 6cc9151
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/6595335843d2b7000840b773

@yyx990803 yyx990803 merged commit fe03b2f into vuejs:main Jan 3, 2024
11 checks passed
@Alfred-Skyblue Alfred-Skyblue deleted the chore/watch-deep-warn branch January 3, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants